<?php //echo Yii::app()->request->baseUrl; ?>
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/assets/css/bootstrap.css" type="text/css" media="screen" />
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl; ?>/assets/css/bootstrap-responsive.css" type="text/css" media="screen" />
<div class="container">
	<div class="jumbotron">
<?php    
$rout_api = Yii::app()->request->baseUrl."routeros_api.class.php";
		require('routeros_api.class.php');
	
		$API = new routeros_api();
	
		if ($API->connect('192.168.88.1', 'admin', '')) {
	
			$API->write('/ip/hotspot/active/getall');

	
			$READ = $API->read(false);
			$ARRAY = $API->parse_response($READ);
	
			//echo "<pre>";print_r($ARRAY);echo "</pre>";
	
			$API->disconnect();
	
		}
?>

<table class="table table-hover">
	 <tbody>
<?php 

foreach ($ARRAY as $data)
    {  

    	$name=$data['name'];
    	$profile=$data['profile'];
    	$uptime=$data['uptime']
			//echo "$key is at $value";
			?>
		 		 <tr>
		 		 <td>
					<div class="checkbox">
				    <label>
				      <input type="checkbox"> 
				    </label>
				  	</div>
				 </td>
		 		 <td><?php echo $name?></td>
		 		 <td><?php echo $profile?></td>
		 		 <td><?php echo $uptime?></td>
		 		 </tr>
		 	 <?php 
		
	?>      
 
   <?php 
    } 
    
    ?> 
   
     </tbody>
        </table>

	</div>
</div>

